const log = require('./log');

const units = [
    {path:'sys', name:'sys',title:'系统管理',icon:'rs-icon-mgmt',
        menus:[
            {path:'user', name:'UserPage',title:'用户管理',icon:'rs-icon-user',keepAlive:true},
            {path:'unit', name:'UnitPage',title:'机构管理',icon:'rs-icon-unit',keepAlive:true},
            {path:'role', name:'RolePage',title:'角色管理',icon:'rs-icon-role',keepAlive:true},
            {path:'menu', name:'MenuPage',title:'菜单管理',icon:'el-icon-menu',keepAlive:true},
            {path:'auth', name:'AuthPage',title:'权限管理',icon:'rs-icon-auth',keepAlive:true}
        ]
    },
    {path:'menu2', name:'menu2',title:'测试菜单2',icon:'el-icon-menu'},
    {path:'menu3', name:'menu3',title:'测试菜单3',icon:'el-icon-document'},
    {path:'menu4', name:'menu4',title:'测试菜单4',icon:'rs-icon-leaf'},
    {path:'menu5', name:'menu5',title:'测试菜单5',icon:'rs-icon-leaf'},
]

module.exports = {
    menus:menus,
    loadMenu:function(req,res){

        setTimeout(() => {
            res.status(200).json({
                error: 0,
                menus:menus
            });
        }, 100);
    }
}